#!/usr/bin/expect
spawn apt-get install  systemctl
set timeout -1
expect "?]"
exp_send "Yes, do as I say!\r"
expect eof